﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BuXiaChu.OrderDishes.Model;

namespace BuXiaChu.OrderDishes.BLL.ModelExtensions
{
    public static class AreaExtension
    {
        public static AreaModel GetParentFrom(this AreaModel source, List<AreaModel> list)
        {
            AreaModel result = new AreaModel();
            foreach (var item in list)
            {
                if (item.Id == source.ParentId)
                {
                    result = item;
                }
            }
            return result;
        }
    }
}
